
<!DOCTYPE html>
<!--

    Copyright (c) 2017, 2019 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <title>enable-monitoring</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/style.css" rel="stylesheet">
    <script src="https://use.fontawesome.com/96c4d89611.js"></script>
  </head>
  <body>
<table id="doc-title" cellspacing="0" cellpadding="0">
  <tr>
  <td align="left" valign="top">
  <b>enable-monitoring</b><br />
  </td>
  </tr>
</table>
<hr />

<table width="90%" id="top-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>
		<td align="left">
		<a href="enable-http-lb-server.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="enable-secure-admin.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class=" vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>


<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><a id="enable-monitoring-1"></a><a id="GSRFM00128"></a><a id="enable-monitoring"></a></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_enable_monitoring">enable-monitoring</h2>
<div class="sectionbody">
<div class="paragraph">
<p>enables monitoring for the server or for specific monitorable modules</p>
</div>
<div id="sthref1119" class="paragraph">
<p>Synopsis</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin [asadmin-options] enable-monitoring [--help]
[--target target]
[--mbean={false|true}]
[--dtrace={true|false}]
[--modules modules[=level][:module[=level]]*
[--pid pid]
[--options options]]</code></pre>
</div>
</div>
<div id="sthref1120" class="paragraph">
<p>Description</p>
</div>
<div class="paragraph">
<p>The <code>enable-monitoring</code> subcommand is used to turn on monitoring for
\{product---name} or for particular modules during runtime. Changes are
dynamic, that is, server restart is not required.</p>
</div>
<div class="paragraph">
<p>By default, the monitoring service is enabled, that is, the
<code>monitoring-enabled</code> attribute of the <code>monitoring-service</code> element is
<code>true</code>. However, the default monitoring level for individual modules is
<code>OFF</code>. This subcommand used with the <code>--modules</code> option can enable
monitoring for a given module by setting the monitoring level to HIGH or
LOW. If level is not specified when running the subcommand, the level
defaults to HIGH.</p>
</div>
<div class="paragraph">
<p>The specific meanings of HIGH or LOW are determined by the individual
containers. For a list of monitorable modules, see the <code>--modules</code>
option in this help page.</p>
</div>
<div class="paragraph">
<p>An alternative method for enabling monitoring is to use the <code>set</code>
subcommand. In this case, the server must be restarted for changes to
take effect.</p>
</div>
<div class="paragraph">
<p>This subcommand is supported in remote mode only.</p>
</div>
<div id="sthref1121" class="paragraph">
<p>Options</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">asadmin-options</dt>
<dd>
<p>Options for the <code>asadmin</code> utility. For information about these
options, see the <a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a> help page.</p>
</dd>
<dt class="hdlist1"><code>--help</code></dt>
<dt class="hdlist1"><code>-?</code></dt>
<dd>
<p>Displays the help text for the subcommand.</p>
</dd>
<dt class="hdlist1"><code>--target</code></dt>
<dd>
<p>Specifies the target on which to enabling monitoring. Valid values are
as follows:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>server</code></dt>
<dd>
<p>Enables monitoring for the default server instance <code>server</code> and is
the default value.</p>
</dd>
<dt class="hdlist1">configuration-name</dt>
<dd>
<p>Enables monitoring for the named configuration.</p>
</dd>
<dt class="hdlist1">cluster-name</dt>
<dd>
<p>Enables monitoring for every server instance in the cluster.</p>
</dd>
<dt class="hdlist1">instance-name</dt>
<dd>
<p>Enables monitoring for a particular server instance.</p>
</dd>
</dl>
</div>
</dd>
<dt class="hdlist1"><code>--mbean</code></dt>
<dd>
<p>Enables Mbean monitoring. Default value is false.</p>
</dd>
<dt class="hdlist1"><code>--dtrace</code></dt>
<dd>
<p>Only usable if the DTrace Monitoring module is present. Enables Oracle
Solaris DTrace monitoring. Default value is false.</p>
</dd>
<dt class="hdlist1"><code>--modules</code></dt>
<dd>
<p>Enables specified module or modules by indicating monitoring level.
Valid levels are OFF, HIGH, LOW. If level is not specified, the
default setting is HIGH. Multiple modules are separated by : (colon).
Monitorable modules include <code>connector-connection-pool</code>,
<code>connector-service</code>, <code>ejb-container</code>, <code>http-service</code>,
<code>jdbc-connection-pool</code>, <code>jersey</code>, <code>jpa</code>, <code>jms-service</code>, <code>jvm</code>,
<code>security</code>, <code>thread-pool</code>, <code>transaction-service</code>, <code>web-container</code>, and
<code>web-services-container</code>. Additional modules can be listed by using
the <code>get</code> subcommand.</p>
</dd>
<dt class="hdlist1"><code>--pid</code></dt>
<dd>
<p>Specifies the \{product---name} JVM process identifier (PID). When
monitoring is enabled, the <code>btrace-agent</code> is attached, based on the
specified PID. Need to specify only in exceptional cases when the
system cannot determine the PID. In this situation, the subcommand
prompts for the PID of the corresponding \{product---name}process.</p>
</dd>
<dt class="hdlist1"><code>--options</code></dt>
<dd>
<p>Sets the following <code>btrace-agent</code> options:<br></p>
<div class="dlist">
<dl>
<dt class="hdlist1"><code>debug</code></dt>
<dd>
<p>Enables debugging for BTrace. Default value is false.</p>
</dd>
</dl>
</div>
</dd>
</dl>
</div>
<div id="sthref1122" class="paragraph">
<p>Examples</p>
</div>
<div class="paragraph">
<p><a id="GSRFM603"></a><a id="sthref1123"></a></p>
</div>
<div class="paragraph">
<p>Example 1   Enabling the Monitoring Service for \{product---name}</p>
</div>
<div class="paragraph">
<p>This example enables monitoring for \{product---name} in general by
setting the <code>enable-monitoring</code> flag to <code>true</code> (default is <code>true</code>).</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; enable-monitoring
Command enable-monitoring executed successfully</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM604"></a><a id="sthref1124"></a></p>
</div>
<div class="paragraph">
<p>Example 2   Enabling Monitoring for the Web and EJB Containers</p>
</div>
<div class="paragraph">
<p>This example enables monitoring for specific containers by setting their
monitoring levels.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; enable-monitoring --modules web-container=LOW:ejb-container=HIGH
Command enable-monitoring executed successfully</code></pre>
</div>
</div>
<div class="paragraph">
<p><a id="GSRFM605"></a><a id="sthref1125"></a></p>
</div>
<div class="paragraph">
<p>Example 3   Turning on Debugging for Monitoring</p>
</div>
<div class="paragraph">
<p>This example turns on debugging.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="prettyprint highlight"><code class="language-oac_no_warn" data-lang="oac_no_warn">asadmin&gt; enable-monitoring --options debug=true
Command enable-monitoring executed successfully</code></pre>
</div>
</div>
<div id="sthref1126" class="paragraph">
<p>Exit Status</p>
</div>
<div class="dlist">
<dl>
<dt class="hdlist1">0</dt>
<dd>
<p>subcommand executed successfully</p>
</dd>
<dt class="hdlist1">1</dt>
<dd>
<p>error in executing the subcommand</p>
</dd>
</dl>
</div>
<div id="sthref1127" class="paragraph">
<p>See Also</p>
</div>
<div class="paragraph">
<p><a href="asadmin.html#asadmin-1m"><code>asadmin</code>(1M)</a></p>
</div>
<div class="paragraph">
<p><a href="disable-monitoring.html#disable-monitoring-1"><code>disable-monitoring</code>(1)</a>,
<a href="get.html#get-1"><code>get</code>(1)</a>, <a href="list.html#list-1"><code>list</code>(1)</a>,
<a href="monitor.html#monitor-1"><code>monitor</code>(1)</a>, <a href="set.html#set-1"><code>set</code>(1)</a></p>
</div>
<div class="paragraph">
<p><a href="monitoring.html#monitoring-5asc"><code>monitoring</code>(5ASC)</a></p>
</div>
</div>
</div>

<hr />

<table width="90%" id="bottom-nav" cellspacing="0" cellpadding="0">
	<colgroup>
		<col width="12%"/>
		<col width="12%"/>
		<col width="*"/>
	</colgroup>
	<tr>		
		<td align="left">
		<a href="enable-http-lb-server.html">
			<span class=" vector-font"><i class="fa fa-arrow-circle-left" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Previous</span>
		</a>
		</td>

		<td align="left">
		<a href="enable-secure-admin.html">
			<span class="vector-font"><i class="fa fa-arrow-circle-right vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Next</span>
		</a>
		</td>

		<td align="right">
		<a href="toc.html">
			<span class="vector-font"><i class="fa fa-list vector-font" aria-hidden="true"></i></span>
			<span style="position:relative;top:-2px;">Contents</span>
		</a>
		</td>
	</tr>
</table>

<span id="copyright">
        <img src="/resource/reference/img/eclipse_foundation_logo_tiny.png" height="20px" alt="Eclipse Foundation Logo" align="top"/>&nbsp;            
        <span >Copyright&nbsp;&copy;&nbsp;2019,&nbsp;Oracle&nbsp;and/or&nbsp;its&nbsp;affiliates.&nbsp;All&nbsp;rights&nbsp;reserved.</span>
</span>

</body>
</html>
